#ifndef _HUMAN_
#define _HUMAN_

#include <iostream>
#include <map>
#include <vector>

#include "Animal.h"
#include "Reason.h"
#include "Values.h"

namespace Hunger
{
	struct Choice;
	struct Decision;

	class Human : public Animal
	{
	public:
		Human();
		virtual ~Human();

		void Speak();
		void Move();
		void Attack();

		Decision Choose(Choice * choice);
		std::vector<Decision> Choose(std::vector<Choice *> choices);

		void SetMorale(int newMorale) { morale = newMorale; }
		const int GetMorale() { return morale; }

		void SetEmpathy(int newEmpathy) { empathy = newEmpathy; }
		const int GetEmpathy() { return empathy; }

		const Values GetPersonalValues() { return values; }

		void CreateAffinities(std::vector<Human *> people);
		void UpdateAffinity(Human * other, int affectedValue);

		const int GetAffinity(Human * other) { return affinities[other]; }

	private:
		void FigurePersonalValues();
		int ComparePersonalValues(Human * other);

	private:
		int morale;
		int empathy;

		Values values;

		Reason * reason;

		std::map<Human *, int> affinities;
	};
}
#endif //_HUMAN_